﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IView.cs" company="">
//   
// </copyright>
// <summary>
//   The View interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Views
{
	using System;

	using Libium.Core;
	using Libium.UseCases;

	/// <summary>
	///   The View interface.
	/// </summary>
	public interface IView
	{
		#region Public Events

		/// <summary>
		///   The focused changed.
		/// </summary>
		event Action<IView> FocusedChanged;

		/// <summary>
		///  Cancels wating process.
		/// </summary>
		event Action<IView> WaitCancelled;

		#endregion

		#region Public Properties

		/// <summary>
		///   Gets or sets the copy source.
		/// </summary>
		ICopySource CopySource { get; set; }

		/// <summary>
		///   Gets or sets a value indicating whether enabled.
		/// </summary>
		bool Enabled { get; set; }

		/// <summary>
		///   Gets a value indicating whether focused.
		/// </summary>
		bool Focused { get; }

		/// <summary>
		///   Gets or sets the paste target.
		/// </summary>
		IPasteTarget PasteTarget { get; set; }

		/// <summary>
		///   Gets or sets a value indicating whether read only.
		/// </summary>
		bool ReadOnly { get; set; }

		#endregion

		#region Public Methods and Operators

		/// <summary>
		///   The clear.
		/// </summary>
		void Clear();

		/// <summary>
		///   The focus.
		/// </summary>
		/// <returns> The <see cref="bool" /> . </returns>
		bool Focus();

		///<summary>
		///Displays the warning message.
		///</summary>
		void AddWarning(string warning);

		///<summary>
		///Removes the warning message.
		///</summary>
		void RemoveWarning();

		///<summary>
		///Displays the error message.
		///</summary>
		void AddError(string error);

		///<summary>
		///Removes the error message.
		///</summary>
		void RemoveError();

		///<summary>
		///Displays the hint message.
		///</summary>
		void AddHint(string hint);

		///<summary>
		///Removes the hint message.
		///</summary>
		void RemoveHint();

		///<summary>
		///Starts waiting.
		///</summary>
		void StartWait(IUseCase useCase);

		///<summary>
		///Ends waiting.
		///</summary>
		void EndWait(IUseCase useCase);

		///<summary>
		///Sets waiting progress.
		///</summary>
		void SetWaitProgress(IUseCase useCase);

		#endregion
	}
}